//
//  lnvSumViewCell.swift
//  NewLndd
//
//  Created by 邵禹曦 on 2020/1/7.
//  Copyright © 2020 辽宁当代. All rights reserved.
//

import UIKit
// MARK: - 存货汇总
class lnvSumViewCell: UITableViewCell {

    // MARK: - 属性
    @IBOutlet weak var CON: UILabel! // 商品名称
    @IBOutlet weak var COI: UILabel! // 商品代码
    @IBOutlet weak var HQ: UILabel!  // 存货数量
    @IBOutlet weak var HAP: UILabel! // 存货均价
    @IBOutlet weak var HF: UILabel! // 存货余额
    @IBOutlet weak var HPL: UILabel! //货值变化
    @IBOutlet weak var MV: UILabel! //存货价值
    @IBOutlet weak var OFQ: UILabel! //挂单冻结数量
    @IBOutlet weak var LFQ: UILabel! //限销数量
    @IBOutlet weak var DQ: UILabel! // 交收申请数量
    
    // MARK: - 自定义属性
    var ViewModel : lnvSum? {
        
        // 属性监听器
        didSet {
            
            // 1. nil值校验
            guard let ViewModel = ViewModel else {
                return
            }
            
            COI.text = ViewModel.COI
            CON.text = ViewModel.CON
            HQ.text = ViewModel.HQ
            HAP.text = ViewModel.HAP
            HF.text = ViewModel.HF
            HPL.text = ViewModel.HPL
            MV.text = ViewModel.MV
            OFQ.text = ViewModel.OFQ
            LFQ.text = ViewModel.LFQ
            DQ.text = ViewModel.DQ
            
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
